package com.guonl.plus.service.impl;

import com.guonl.plus.entity.UserPlus;
import com.guonl.plus.mapper.UserPlusMapper;
import com.guonl.plus.service.IUserPlusService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.guonl.plus.vo.UserJoinVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author guonl
 * @since 2024-02-05
 */
@Service
public class UserPlusServiceImpl extends ServiceImpl<UserPlusMapper, UserPlus> implements IUserPlusService {

    @Autowired
    private UserPlusMapper userPlusMapper;

    @Override
    public UserPlus getByUserId(String userId) {
        return userPlusMapper.getUserBuId(userId);
    }

    @Override
    public UserPlus getByUserId2(String userId) {
        return userPlusMapper.getUserBuId2(userId);
    }

    @Override
    public List<UserPlus> userAll() {
        return userPlusMapper.getAllUser();
    }

    @Override
    public void updateById2(UserPlus params) {
        userPlusMapper.updateById2(params);
    }

    @Override
    public List<UserJoinVO> getJoinData(String userId) {
        return userPlusMapper.getJoinData(userId);
    }

}
